<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      /* 
      1. 执行次数===属性的个数
      2. 每次执行都会将当前属性赋值给变量k
      */
      const user = {
        name: "jack",
        age: 20,
        gender: "boy",
      };
      // 遍历对象
      for (let k in user) {
        console.log("hello", k, user[k]);
      }
    </script>
  </body>
</html>
